<?php
namespace app\admin\validate;
use think\Validate;

class Store extends Validate
{
    protected $rule = [
        'name'   => 'require',
        'mobile' => 'require|mobile|unique:store|unique:store_user',
        'exp_time' => 'require'
    ];

    protected $message = [
        'name.require' => '字典名称不能为空',
    ];

    /**
     * 验证场景
     * @var \string[][]
     */
    protected $scene = [
        'add'   =>  ['name'],
        'esdit'  =>  ['name','mobile'],
    ];
}
